﻿<%@ Page Title="" Language="C#" MasterPageFile="~/Article.Master" AutoEventWireup="true" CodeBehind="ArticleDetail.aspx.cs" Inherits="TienTeTuong.ArticleDetail" %>
<%@ Import Namespace="TienTeTuong" %>
<%@ Import Namespace="TienTeTuong.DTO" %>
<asp:Content ID="Content1" ContentPlaceHolderID="MainContentPlaceHolder" runat="server">
                	<div class="mainArticleBgT"><div class="mainArticleBgB">
                    	<div class="mainTitle"><%= article.Title %></div>
                        <div class="mainContent">
                        <!-- Detail Article -->
                            <div class="articleDetail">
                                <%= article.Content %>              
                            </div>
                        <!-- View Comments -->
                        	<div class="articleComment">
                            	<div class="Title">Bình luận (<%= articleComments.Count %>)</div>
                                <div class="Content">
                                <% foreach (CommentDTO comment in articleComments)
{%>
                                	<div class="articleCommentTD">
                                    	<%--<div style="float:right;"><a href="javascript:void(0);" onclick="GotoComment();">Trả lời &raquo;</a></div>--%>
                                        <div class="Top">
                                        	<img src="images/iChat.png"/>
                                            <span class="nickName"><%= comment.PName %></span>
                                            &nbsp;(<%= comment.CreatedDate.ToShortDateString() %>)
                                            &nbsp;<a href="mailto:<%= comment.PEmail %>"><img src="images/email.png"/></a>
                                        </div>
                                        <div class="clear"></div>
                                        <div class="Comment"><%= comment.Content %></div>
                                    </div>
<%  
} %>
                                    <%--<div align="right" class="viewAll"><a href="javascript:void(0);">Xem tất cả comment / Rút gọn các comment</a></div>--%>
                                    
                                </div>
                            </div>
                        <!-- Write Comments -->
                        	<div class="articleForm">
								<div class="Title">Gửi bình luận</div>
                                <div class="Content">
                                	<table cellpadding="0" cellspacing="5">
                                    	<tr>
                                        	<td><input id="txt_name" name="txt_name" type="text" value="Họ tên" class="articleFormTxt" style="width:215px;" onfocus="if (this.value=='Họ tên') this.value='';" onchange="CheckComment();" onblur="CheckComment(); if (this.value=='') this.value='Họ tên';" /></td>
                                        	<td width="10"></td>
                                        	<td colspan="2"><input id="txt_email" name="txt_email" type="text" value="Email" class="articleFormTxt" style="width:215px;" onfocus="if (this.value=='Email') this.value='';" onchange="CheckComment();" onblur="CheckComment(); if (this.value=='') this.value='Email';" /></td>
                                        </tr>
                                    	<%--<tr>
                                        	<td><a href="#">Bấm vào đây để nhận mã &raquo;</a></td>
                                        	<td></td>
                                        	<td><img src="images/code.png"/></td>
                                        	<td><input name="txt_code" type="text" value="Mã xác nhận" class="articleFormTxt" style="width:130px;" /></td>
                                        </tr>--%>
                                    	<tr>
                                        	<td colspan="4"><textarea id="txt_cmt" name="txt_cmt" cols="" rows="5" class="articleFormTxt" style="width:100%;"  onblur="CheckComment();" onkeypress="CheckComment();"></textarea></td>
                                        </tr>
                                    	<tr>
                                        	<td colspan="3"><input id="btn_send" name="btn_send" type="submit" value="Gửi thông tin" /><input name="btn_clear" type="button" value="Nhập lại" onclick="ClearForm();" /></td>
                                            <%--<td colspan="1"><div id="lang_type" name="lang_type">
                                            	<label><input type="radio" name="lang_type" value="radio" id="lang_type_0" checked="checked" />Tắt</label>
                                            	<label><input type="radio" name="lang_type" value="radio" id="lang_type_1" />Telex</label>
                                                <label><input type="radio" name="lang_type" value="radio" id="lang_type_1" />Vni</label>
                                       	    </div></td>--%>
                                        </tr>
                                    </table>
                                </div>
                            </div>
                        <!-- Other Articles -->
                            <div class="articleOthers">
                                <div class="Title">Bài viết khác</div>
                                <ul>
                                <% foreach (ArticleDTO newArticle in newArticles)
{ %>
                                	<li><a href="ArticleDetail.aspx?id=<%= newArticle.ArtID %>"><%= newArticle.Title %></a></li>
<%  
} %>
                                </ul>
                            </div>
                        </div>
                    </div></div>
</asp:Content>
